@mermaid-js/mermaid-cli 9.1.6 → 9.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,6 +21,26 @@ mmdc -i input.mmd -o output.svg
21
21
  mmdc -i input.mmd -o output.png -t dark -b transparent
22
22
  ```
23
23
 
24
+ ### Animating an SVG file with custom CSS
25
+
26
+ The `--cssFile` option can be used to inline some custom CSS.
27
+
28
+ Please see [./test-positive/flowchart1.css](test-positive/flowchart1.css) for an example of a CSS file that has animations.
29
+
30
+ **Warning**: If you want to override `mermaid`'s [`themeCSS`](https://mermaid-js.github.io/mermaid/#/Setup?id=theme), we recommend instead adding `{"themeCSS": "..."})` to your mermaid `--configFile`. You may also need to use [`!important`](https://developer.mozilla.org/en-US/docs/Web/CSS/important) to override mermiad's `themeCSS`.
31
+
32
+ **Warning**: Inline CSS files may be blocked by your browser, depending on the [HTTP Content-Security-Policy header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) of the website that hosts your SVG.
33
+
34
+ ```sh
35
+ mmdc --input test-positive/flowchart1.mmd --cssFile test-positive/flowchart1.css -o docs/animated-flowchart.svg
36
+ ```
37
+
38
+ <details>
39
+ <summary>Example output: docs/animated-flowchart.svg</summary>
40
+
41
+ ![docs/animated-flowchart.svg](docs/animated-flowchart.svg)
42
+ </details>
43
+
24
44
  ### Transform a markdown file with mermaid diagrams
25
45
 
26
46
  ```sh
@@ -43,6 +63,14 @@ graph
43
63
  sequenceDiagram
44
64
  [....]
45
65
  ```
66
+
67
+ ### Mermaid with custom title/desc
68
+ ```mermaid
69
+ graph
70
+ accTitle: My title here
71
+ accDescr: My description here
72
+ A-->B
73
+ ```
46
74
  ~~~
47
75
 
48
76
  Becomes:
@@ -53,6 +81,9 @@ Becomes:
53
81
 
54
82
  ### Some more markdown
55
83
  ![diagram](./readme-2.svg)
84
+
85
+ ### Mermaid with custom title/desc
86
+ ![My description here](./readme-3.svg "My title here")
56
87
  ```
57
88
 
58
89
  ### Piping from stdin